<!DOCTYPE html>
<html>
<head>
	<title>forEach</title>
</head>
<body>
<script type="text/javascript">
	/*var arr = ["西瓜","香蕉","苹果","葡萄","草莓"];
	arr.forEach(function(value,index,obj){
		console.log("value ="+value+"-----index ="+index);
	})*/

	var arr = [1,2,3,4,5];
	for (var i=0;i<arr.length;i++) {
		console.log(5-i);
	}
</script>
</body>
</html>